
import React, { Component } from 'react';
import {
  View, Text,
} from 'react-native';
import { DatePickerView, Provider } from '@ant-design/react-native';

class ReactNativeModalDropdown extends Component {
  constructor(props) {
    super(props);
    this.state = {
      value: undefined,
    };
    this.onChange = (value) => {
      console.log(value);
      this.setState({ value });
    };
    this.onValueChange = (...args) => {
      console.log(args);
    };
  }

  componentDidMount() {
    // this.setState({ daysList: list })
  }

  render() {
    return (
      <Provider>
        <View>
          <Text style={{ margin: 16 }}>Start DateTime</Text>
          <DatePickerView
            value={this.state.value}
            onChange={this.onChange}
            onValueChange={this.onValueChange}
          />
          <Text style={{ margin: 16 }}>End DateTime</Text>
          <DatePickerView
            value={this.state.value}
            onChange={this.onChange}
            onValueChange={this.onValueChange}
          />
        </View>
      </Provider>
    );
  }
}

export default ReactNativeModalDropdown;
